$(function () {
  layui.use("layer",function(){
    $('.add-test-paper .select').on('click', function() {
      layer.open({
        type: 1,
        title: '选择知识点',
        content: $('#select-konwleg'),
        offset: '30px',
        area: ['700px', '600px']
      })
  
      renderTable()
    })
  })

  function renderTable() {
    layui.use('table', function () {
      var table = layui.table
      table.render({
        elem: '#konwleg-table',
        url: '/Do/MS/queryMsBatchFileJson?' + $("#positionSearchbox").serialize(), //数据接口
        page: true,
        cols: [
          [
            { type:'checkbox', fixed:'left', width: 50 },
            { field: 'knowledgeName', title: '知识点', width: 200 },
            { field: 'knowledgeName', title: '所属专业', width: 200 },
            { field: 'knowledgeName', title: '题目类型', width: 80 },
            { field: 'knowledgeName', title: '题库数量', width: 80 },
            { field: 'knowledgeName', title: '抽题数量', width: 80 },
          ],
        ],
      })
    })
  }
})
